import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopy {
    public static void main(String[] args) {
        String sourceFilePath = "d:/SoftData/Videos/演示视频.mp4";
        String destFilePath = "./video.mp4";

        try (FileInputStream fis = new FileInputStream(sourceFilePath);
                FileOutputStream fos = new FileOutputStream(destFilePath)) {

            byte[] buffer = new byte[1024 * 8]; // 使用8KB的缓冲区
            int bytesRead;

            while ((bytesRead = fis.read(buffer)) != -1) {
                fos.write(buffer, 0, bytesRead); // 写入实际读取到的数据量
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}